package com.mars.ticket.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.mars.ticket.entity.Ticket;
import com.mars.ticket.request.SysTicketRequest;
import com.mars.ticket.response.TicketResponse;
import com.mars.ticket.response.base.PageInfo;

/**
 * Ticket 接口
 *
 * @Author wq
 * @Date 2021-03-15
 **/
public interface ITicketService extends IService<Ticket> {


    /**
     * 添加车票
     *
     * @param request request
     */
    void add(SysTicketRequest request);


    /**
     * 删除车票
     *
     * @param id id
     */
    void delete(Integer id);

    /**
     * 修改车票
     *
     * @param request request
     */
    void updateTicket(SysTicketRequest request);

    /**
     * 分页查询
     *
     * @param request request
     * @return PageInfo<Ticket>
     */
    PageInfo<Ticket> listTicket(SysTicketRequest request);

    /**
     * 查询车票
     *
     * @param id id
     */
    Ticket acquire(Integer id);


    void orderTicket(Integer userId, Integer id);
}
